<div class="main personal-work-bench">
  <div class="main-header">
    <div class="pa-icon-div pull-left fs-14">
      <i class="iconfont icon-shouye fs-14 icon-vertical-top"></i>
      <span class="fs-vertical-middle">工作台>
      <span class="fs-theme-color">流程审批</span>
      </span>
    </div>
  </div>
  <div class="main-content">
    <div class="search-info">
      <div class="container-header fs-16">
        <span>工作台</span>
      </div>
      <form class="base-info" name="queryForm">
        <div class="base-info-item">
          <!-- <div class="pa-form-control">
            <label>主题：</label>
            <input type="text" class="pa-form-control-input"
              ng-model="vm.mapParams.processTitle">
          </div>
          <div class="pa-form-control">
            <label>类型选择：</label>
            <select class="pa-form-control-select"
              ng-options="document.id as document.name for document in documentType"
              ng-model="vm.mapParams.documentType">
              <option value="{{document.name}}">{{document.name}}</option>
            </select>
          </div> -->
          <div class="pa-form-control">
            <label>创建时间：</label>
            <input type="text" class="pa-form-control-input date-picker"
              name="createStartTime"
              data-ng-datepicker
              ng-model="vm.mapParams.createStartTime">
            <label class="pa-form-zhi">至</label>
            <input type="text" class="pa-form-control-input date-picker"
              name="createEndTime"
              data-ng-datepicker
              ng-model="vm.mapParams.createEndTime">
          </div>
          <div class="pa-form-control-btn fr">
            <button class="pa-btn pa-sw-btn" type="button"
              ng-click="vm.$query(queryForm)">搜索</button>
            <button class="pa-btn pa-sw-btn reset-btn" type="reset"
              ng-click="vm.$reset()">重置</button>
          </div>
        </div>
      </form>
    </div>
    <div class="switch-tabs clear">
      <div class="table-item"
        ng-repeat="item in vm.tabData"
        ng-class="{'active': $index == vm.selectedIndex}"
        ng-click="vm.$paginationQuery(item.type, $index)">{{item.name}}</div>
    </div>
    <div ng-if="vm.processType == 1">
      <div ng-controller="processTodoCtrl as vm">
        <pa-table>
          <table class="pa-table">
            <thead>
              <tr>
                <th>创建时间</th>
                <th>主题</th>
                <th>类型</th>
                <th>上一环节提交时间</th>
                <th>当前步骤</th>
                <th class="operate">操作</th>
              </tr>
            </thead>
            <tbody>
              <tr ng-repeat="item in vm.todoListData">
                <td>{{item.createdTime | date:"yyyy-MM-dd"}}</td>
                <td>{{item.processTitle}}</td>
                <td>{{item.documentTypeName}}</td>
                <td>{{item.upSubmitTime | date:"yyyy-MM-dd"}}</td>
                <td>{{item.nodeName}}</td>
                <td>
                  <div class="operate-del"
                    ui-sref="processTableTodo({piId: item.piId, todoId: item.id, tableId: item.businessId, name: item.documentTypeName})">
                    <i class="iconfont icon-middle icon-xiugai1 edit-color fs-12"></i>
                    <span>去办理</span>
                  </div>
                </td>
              </tr>
            </tbody>
          </table>
        </pa-table>
      </div>
    </div>
    <div ng-if="vm.processType == 2">
      <div ng-controller="processDoingCtrl as vm">
        <pa-table>
          <table class="pa-table">
            <thead>
              <tr>
                <th>创建时间</th>
                <th>主题</th>
                <th>类型</th>
                <th>上一环节提交时间</th>
                <th>当前步骤</th>
                <th>当前审批人</th>
                <th class="operate">操作</th>
              </tr>
            </thead>
            <tbody>
              <tr ng-repeat="item in vm.doingListData">
                <td>{{item.createdTime | date:"yyyy-MM-dd"}}</td>
                <td>{{item.processTitle}}</td>
                <td>{{item.documentTypeName}}</td>
                <td>{{item.upSubmitTime | date:"yyyy-MM-dd"}}</td>
                <td>{{item.nodeName}}</td>
                <td>{{item.currUserName}}</td>
                <td>
                  <div class="operate-del"
                  ui-sref="processTableDetail({piId: item.piId, tableId: item.businessId, name: item.documentTypeName})">
                  <i class="iconfont icon-middle icon-shanchu trash-color fs-12"></i>
                  <span>详情</span>
                  </div>
                </td>
              </tr>
            </tbody>
          </table>
        </pa-table>
      </div>
    </div>
    <div ng-if="vm.processType == 3">
      <div ng-controller="processDoneCtrl as vm">
        <pa-table>
          <table class="pa-table">
            <thead>
              <tr>
                <th>创建时间</th>
                <th>主题</th>
                <th>类型</th>
                <th>完成时间</th>
                <th>归档状态</th>
                <th class="operate">操作</th>
              </tr>
            </thead>
            <tbody>
              <tr ng-repeat="item in vm.doneListData">
                <td>{{item.createdTime | date:"yyyy-MM-dd"}}</td>
                <td>{{item.processTitle}}</td>
                <td>{{item.documentTypeName}}</td>
                <td>{{item.endTime | date:"yyyy-MM-dd"}}</td>
                <td>{{item.fileStatus == 1 ? '未归档' : item.fileStatus == 2 ? '归档' : ''}}</td>
                <td>
                  <div class="operate-del"
                    ui-sref="processTableDetail({piId: item.piId, tableId: item.businessId, name: item.documentTypeName})">
                    <i class="iconfont icon-middle icon-shanchu trash-color fs-12"></i>
                    <span>详情</span>
                  </div>
                </td>
              </tr>
            </tbody>
          </table>
        </pa-table>
      </div>
    </div>
  </div>
</div>
